#include <iostream>
#include<fstream>
#include<string.h>

using namespace std;

int main()
{
    ofstream o;
    const char * str = "two line4\n";
    o.open("1.txt",ios::app);
    o<<"this is a test4\n";
    o.write(str,strlen(str));
    o.close();
    
    return 0;
}